/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dataModel.process;

import java.util.ArrayList;

/**
 *
 * @author Bruna
 */
public class Activity extends Element{

    private int type;
    private String looptype;
    private ArrayList<Annotation> annotations;
    private ArrayList<Integer> attachedEvents;

    public Activity(int id, String label, Lane lane, Pool pool, int type) {
        super(id, label, lane, pool);
        this.type = type;
        annotations = new ArrayList<Annotation>();
        attachedEvents = new ArrayList<Integer>();
    }
    
    public Activity(int id, String label, Lane lane, Pool pool, int type, String looptype) {
        super(id, label, lane, pool);
        this.type = type;
        annotations = new ArrayList<Annotation>();
        attachedEvents = new ArrayList<Integer>();
        this.looptype = looptype;
    }

    public boolean hasAttachedEvents() {
        return attachedEvents.size() > 0;
    }

    public ArrayList<Integer> getAttachedEvents() {
        return attachedEvents;
    }

    public void addAttachedEvent(Integer id) {
        attachedEvents.add(id);
    }

    public ArrayList<Annotation> getAnnotations() {
        return annotations;
    }

    public int getType() {
        return type;
    }

    public void addAnnotation(Annotation a) {
        annotations.add(a);
    }

    public String getLooptype() {
        return looptype;
    }
}
